Imagemap message
Imagemap messages are messages configured with an image that has multiple tappable areas. You can assign one tappable area for the entire image or different tappable areas on divided areas of the image.
組圖訊息能夠給予許多地方做按鈕但是無法明確表示所以需要用圖分開才比較明顯
You can also play a video on the image and display a label with a hyperlink after the video is finished.
甚至我們可以在其中放入影片(仍然不推薦因為跑得真的很久)
type
String Required
imagemap
baseUrl
String Required
Base URL of the image
Max character limit: 2000
HTTPS over TLS 1.2 or later
For more information about supported images in imagemap messages, see How to configure an image.
altText
String Required
Alternative text
Max character limit: 400
baseSize.width
Number Required
Width of base image in pixels. Set to 1040.
baseSize.height
Number Required
Height of base image. Set to the height that corresponds to a width of 1040 pixels.
在被點擊時會進行的動作可以連接網站或讓使用者傳送訊息,能引導我們的LINE功能出來
actions
Array of imagemap action objects Required
Action when tapped
Max: 50
以下是要用到影片時才會用到的程式碼
video.originalContentUrl
String *1
URL of the video file (Max character limit: 2000)
HTTPS over TLS 1.2 or later
mp4
Max length: No limit Max file size: 200 MB
video.previewImageUrl
String *1
URL of the preview image (Max character limit: 2000)
HTTPS over TLS 1.2 or later
JPEG or PNG
Max image size: No limits
Max file size: 1 MB
影片位置以左上角為基準點
video.area.x
Number *1
Horizontal position of the video area relative to the left edge of the imagemap area. Value must be 0 or higher.
video.area.y
Number *1
Vertical position of the video area relative to the top of the imagemap area. Value must be 0 or higher.
影片模板大小
video.area.width
Number *1
Width of the video area
video.area.height
Number *1
Height of the video area
先前提到的影片點開後右上角的連結
video.externalLink.linkUri
String *2
Webpage URL. Called when the label displayed after the video is tapped.
Max character limit: 1000
The available schemes are http, https, line, and tel. For more information about the LINE URL scheme, see Using LINE features with the LINE URL scheme.
video.externalLink.label
String *2
Label. Displayed after the video is finished.
Max character limit: 30